package com.goldze.mvvmhabit.ui.login;

import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.ViewGroup;

import androidx.annotation.Nullable;
import androidx.databinding.ObservableField;
import androidx.lifecycle.ViewModelProvider;
import androidx.lifecycle.ViewModelProviders;

import com.goldze.mvvmhabit.BR;
import com.goldze.mvvmhabit.R;
import com.goldze.mvvmhabit.databinding.FragmentDetailBinding;
import com.goldze.mvvmhabit.ui.network.detail.DetailViewModel;

import me.goldze.mvvmhabit.base.BaseFragment;

public class CodeFragment extends BaseFragment {

    private CodeModel codeModel;

    /**
     * 初始化ViewModel的id
     *
     * @return BR的id
     */

    @Override
    public int initContentView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
        codeModel = new ViewModelProvider(getActivity(), new ViewModelProvider.AndroidViewModelFactory(requireActivity().getApplication())).get(CodeModel.class);
        return R.layout.fragment_login_code;
    }

    @Override
    public int initVariableId() {
        return BR.viewModel;
    }







}
